$('#user-add-form').submit(function(event){
	event.preventDefault();
	var form = $(this);
	var url = form.attr('action');
	var firstname = form.find('input[name="firstname"]').val();
	var lastname = form.find('input[name="lastname"]').val();
	var motherLastname = form.find('input[name="mother-lastname"]').val();
	var birthdate = form.find('input[name="birthdate"]').val();
	var identity = form.find('input[name="identity"]').val();
	var gender = form.find('input[name="gender"]').val();
	var username = form.find('input[name="username"]').val();
	var password = form.find('input[name="password"]').val();
	var active = form.find('input[name="active"]').val();
	var myEnterprise = form.find('input[name="my-enterprise"]').val();
	var myDepartament = form.find('select[name="my-departament"]').val();
	var myRoles = form.find('input[name="my-roles"]').val();

	$.post(url,{firstname:firstname,lastname:lastname, motherLastname:motherLastname,birthdate:birthdate,
		identity:identity,gender:gender,username:username,password:password,active:active,myEnterprise:myEnterprise,
		myDepartament:myDepartament,myRoles:myRoles},
		function(response){
			if(response == 'Success'){
				// Cambio el historial del navegador.
				window.location.hash = hashTag+'employees'+URLSeparator+username;
			}else{
				alert(response);
			}
		}
	);
});